package com.xiaoyuanxing.demo.service;


/*
 **@author LuoShengYing
 **@date 2021/5/28
 */

import com.github.pagehelper.Page;
import com.xiaoyuanxing.demo.entity.Talk;
import com.xiaoyuanxing.demo.entity.TalkComment;

public interface TalkService {

    // 获取Talks数据
    Page<Talk> getAllTalks(int pageNum, int pageSize);

    // 新建Talk数据
    boolean createNewTalk(Talk talk);

    // 根据talkID删除Talk
    boolean deleteTalk(int talkID);

    // 根据talkID，查询共有多少条TalkComment数据
    int getCommentCount(int talkID);

    // 根据talkID，查询全部评论
    Page<TalkComment> getComments(int talkID, int pageNum, int pageSize);

    // 新增TalkComment
    boolean createdNewComment(TalkComment talkComment);

    // 根据talkID删除TalkComments
    boolean deleteTalkComments(int talkID);
}
